import request from '@/utils/request'

// 查询判定依据主列表
export function listBsJudgeBase(query) {
  return request({
    url: '/sycs/baQualDetail/pageByBsId',
    method: 'get',
    params: query
  })
}

// 查询试验类型子集
export function listBsType(query) {
  return request({
    url: '/sycs/bsJudgeBase/page',
    method: 'get',
    params: query
  })
}

// 技术指标图鉴表
export function biList(query) {
  return request({
    url: '/sycs/biQualification/biList',
    method: 'get',
    params: query
  })
}

// 查询判定依据主详细
export function getBsJudgeBase(judgeId) {
  return request({
    url: '/sycs/bsJudgeBase/' + judgeId,
    method: 'get'
  })
}

// 查询判定依据主详细
export function getDetail(id) {
  return request({
    url: '/sycs/baQualDetail/' + id,
    method: 'get'
  })
}

// 新增判定依据主
export function addBsJudgeBase(data) {
  return request({
    url: '/sycs/bsJudgeBase',
    method: 'post',
    data: data
  })
}

// 新增判定依据主
export function addDetail(data) {
  return request({
    url: '/sycs/baQualDetail',
    method: 'post',
    data: data
  })
}

// 修改判定依据主
export function updateBsJudgeBase(data) {
  return request({
    url: '/sycs/bsJudgeBase',
    method: 'put',
    data: data
  })
}

// 修改判定依据主
export function updateDetail(data) {
  return request({
    url: '/sycs/baQualDetail',
    method: 'put',
    data: data
  })
}

// 删除判定依据主
export function delBsJudgeBase(judgeId) {
  return request({
    url: '/sycs/bsJudgeBase/' + judgeId,
    method: 'delete'
  })
}

// 删除判定依据主
export function delDetail(id) {
  return request({
    url: '/sycs/baQualDetail/' + id,
    method: 'delete'
  })
}


// 查询试验类型树
export function syTpyeTree(data) {
  return request({
    url: '/sycs/bsJudgeBase/bsJudgeBaseTree',
    method: 'get',
    params: data
  })
}

// 技术指标判定依据树
export function bsJudgeBaseTreeBySyType(data) {
  return request({
    url: '/sycs/bsJudgeBase/bsJudgeBaseTreeBySyType',
    method: 'get',
    params: data
  })
}
